#include<bits/stdc++.h>
using namespace std;
 
int main()
{
	int n = 0;
	cin >> n;
	int a[20000];
 
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];//输入
	}
 
	for (int i = 0; i < n; ++i)
	{
		for (int j = i + 1; j < n; ++j)
		{
			if (a[i] == a[j])
			{
				a[j] = 0;//将某一个数后面的与他相同的数置0
			}
		}
	}
 
	for (int i = 0; i < n; ++i)
	{
		if (a[i] != 0)
		{
			cout << a[i] << " ";//再把非0值输出即可
		}
	}
 
}